package com.example.peanutsubway.service;

import com.example.peanutsubway.entity.AdminUserinfo;
import com.example.peanutsubway.entity.RoleInfo;
import com.example.peanutsubway.util.PageInfo;
import com.example.peanutsubway.vo.UserInfo;

import java.sql.Connection;
import java.util.List;

/**
 * @Author：liulei
 * @Version：1.0
 * @Date：2021/10/11-16:44
 * @Since:jdk1.8
 * @Description:
 */
public interface AdminUserService {
    void setConnection(Connection connection);

    /**
     * 登录
     *
     * @param name
     * @param pwd
     * @return
     */
    UserInfo login(String name, String pwd);

    /**
     *
     * @param nowPage
     * @param pageNum
     * @return
     */
    PageInfo findAllUser(String nowPage, String pageNum);

    /**
     *
     * @return
     */
    List<RoleInfo> findAllRole();

    /**
     * 修改个人信息
     * @param adminUserinfo
     * @return
     */
    Boolean updateRoleMessage(AdminUserinfo adminUserinfo);

    Boolean register(AdminUserinfo adminUserinfo);

    Boolean updateUser(AdminUserinfo adminUserinfo);
    Boolean addUser(AdminUserinfo adminUserinfo);
    Boolean deleteUser(Integer id);
}
